<script setup>
const props = defineProps({
  money: Number,
  car: String,
});

const emit = defineEmits(['changeMoney']);

const changeMoney = () => {
  emit('changeMoney', 10);
};
</script>

<template>
  <div>我是子组件</div>
  <div>money: {{ money }}<button @click="changeMoney">我要花钱</button></div>
  <div>car: {{ car }}</div>
</template>
